package com.kurumi.autoprint.service;

import java.util.Date;
import java.util.List;

import com.kurumi.autoprint.pojo.MrBasic;
import com.kurumi.autoprint.pojo.MrPrintDetail;
import com.kurumi.autoprint.pojo.MrPrintDto;
import com.kurumi.autoprint.pojo.MrPrintType;
import com.kurumi.autoprint.pojo.MrRecordImage;
import com.kurumi.autoprint.util.Result;


public interface MedRecordService {

	List<MrBasic> getMrBasicByIdCard(String idCard,String arcStatus);

	List<MrRecordImage> getMrRecordImageByOnlyId(String onlyId);

	int sendMessage(String phone,String code);
	//添加短信通知
	int addMessageLog(String idCard, String phone, String messageCod);
	
	/**
	 * 根据身份证+电话+校验 校验短信验证
	 * @param idCard
	 * @param phone
	 * @param messageCod
	 * @return
	 */
	boolean validateMessageCode(String idCard, String phone, String messageCod);

	List<MrPrintType> getPrintTypes();
	


	/**
	 * 根据打印类型、打印份数和唯一标识，生成打印文件和计算费用信息
	 * @param mrBasicId
	 * 				病案唯一标识
	 * @param printCode
	 * 				打印类型
	 * @param printNum
	 * 				打印份数
	 * @param printPieceFee
	 * 				打印单价
	 * @return
	 * @throws Exception 
	 */
	MrPrintDto getPrintFeeAndPrintPath(String mrBasicId, String printCode, Integer printNum, String printPieceFee, String ipAddress) throws Exception;


	/**
	 * 保存打印详情信息
	 * @param mrPrintDetail
	 */
	void addMrPrintDetail(MrPrintDetail mrPrintDetail);

	/**
	 * 将PDF文件转化为BASE64二进制
	 * @param mrBasicId
	 * @param printTypeCode
	 * @return
	 */
	Result convertPDF2Base64(String mrBasicId, String printTypeCode, String ipAddress);
	
	/**
	 * 将PDF文件加水印并转化为图片
	 * @param mrBasicId
	 * @param printTypeCode
	 * @param ipAddress
	 * @return
	 */
	Result convertPDF2Imgs(String mrBasicId, String printTypeCode, String ipAddress);
	
	byte[]  createPrintMedicalPdfWater(String sourcefilePath, String hospitalName, String ipAddress) throws Exception;
	
	
	
	

}



